fix: make ActClaim conform to Sendable instead of @unchecked Sendable#1237
fix: make ActClaim conform to Sendable instead of @unchecked Sendable#1237NandanPrabhu wants to merge 1 commit into
Conversation
additionalClaims stored Any values, which aren't Sendable and forced the @unchecked escape hatch. Typing it as [String: any Sendable] lets ActClaim get real Sendable conformance checked by the compiler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing this PR as we need to relook on mark few types to Sendable instead of @unchecked Sendable. This PR covers only the ActClaim but we have other types too |
📋 Changes
ActClaimwas declared@unchecked Sendablebecause itsadditionalClaimsproperty was typed[String: Any], andAnyisn'tSendable. This PR removes the escape hatch by typingadditionalClaims(and theinit?(json:)parameter) as[String: any Sendable], soActClaimgets real, compiler-checkedSendableconformance instead of an unchecked one.Auth0/ActClaim.swift:ActClaimnow conforms toSendable(not@unchecked Sendable);additionalClaimsandinit?(json:)now use[String: any Sendable].Auth0/UserProfile.swift: updated theactclaim cast at theActClaim(json:)call site to[String: any Sendable]to match the new initializer signature.UserProfile.customClaimsremains[String: Any]?(andUserProfileremains@unchecked Sendable) — out of scope for this fix.📎 References
N/A
🎯 Testing
swift buildsucceeds with no errors.swift test— full suite passes, no failures.swiftlint lint— no new violations introduced by this change.